package com.prime.tutorial.moviestore.view.reports;

import com.prime.tutorial.moviestore.domain.Device;
import com.prime.tutorial.moviestore.service.reports.ReportsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import java.util.List;
/**
 * Provides the view level of the networkWorkloadAnalisis report.
 * @author vasylja
 */
@Component("networkWorkloadAnalisis")
@Scope("request")
public class NetworkWorkloadAnalisisImpl {
    private ReportsService reportsService;
    private List<Device> listNetworkWorkloadAnalisis;

    @Autowired
    public NetworkWorkloadAnalisisImpl(ReportsService reportsService) {
        this.reportsService = reportsService;
        setListNetworkWorkloadAnalisis(this.reportsService.getNetworkWorkloadAnalisisReport());
    }

    public List<Device> getListNetworkWorkloadAnalisis() {
        return listNetworkWorkloadAnalisis;
    }

    private void setListNetworkWorkloadAnalisis(List<Device> listNetworkWorkloadAnalisis) {
        this.listNetworkWorkloadAnalisis = listNetworkWorkloadAnalisis;
    }
}
